<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<script type="text/javascript" src="../../zxt/zxt.js"></script>
		<script>importZXT("../../zxt");</script>
	</head>
	
	<body>
	
		<table style='width:400px'>
			<tr>
				<td><div id="btnDISABLE" zxt="zxt.ui.Button" zxt.label="disable" zxt.text="DISABLE" zxt.mode="NORMAL"></div></td>
				<td><div id="btnLABEL" zxt="zxt.ui.Button" zxt.label="disable" zxt.text="LABEL" zxt.mode="NORMAL"></div></td>
				<td><div id="btnMASK" zxt="zxt.ui.Button" zxt.label="disable" zxt.text="MASK" zxt.mode="NORMAL"></div></td>
				<td><div id="btnNORMAL" zxt="zxt.ui.Button" zxt.label="enable" zxt.text="NORMAL" zxt.mode="NORMAL"></div></td>
				<td><div id="btnLock" zxt="zxt.ui.Button" zxt.label="enable" zxt.text="LOCK" zxt.mode="NORMAL"></div></td>			
			</tr>
		</table>
		<hr>
	
		<div id="custr" zxt="zxt.ui.UserIdentity" zxt.required="false" zxt.tip="custrID" style="width:200px;height:20px;"></div>
		
		<hr>
				
		<input type="button" onclick="javascript:setWrong();" value="WRONG ID 2"/>
		<input type="button" onclick="javascript:setCorrect();" value="CORRECT ID"/>
		<input type="button" onclick="javascript:setEmpty();" value="EMPTY ID"/>
		<input type="button" onclick="javascript:getValue();" value="GET VALUE"/>
		<div>
			<a href="../index.html">返回</a>
		</div>
	</body>
</html>

<script type="text/javascript">
	$zxt.init();
	
	
	function setWrong(){		
		$zxtUI.custr.renderValue("abb123");
	}
	
	function setCorrect(){		
		$zxtUI.custr.renderValue("310186198101033237");
	}
	
	function setEmpty(){		
		$zxtUI.custr.renderValue("");
	}
	
	function getValue(){
		alert(	$zxtUI.custr.getValue());
		alert(	$zxtUI.custr.getLabel());
		
	};
	
	function onClick$btnDISABLE(){
		$zxt.mode("DISABLE");
		$zxt.render();
	}
	
	function onClick$btnLABEL(){
		$zxt.mode("LABEL");
		$zxt.render();
	}

	function onClick$btnMASK(){
		$zxt.mode("MASK");
		$zxt.render();
	}
	
	function onClick$btnNORMAL(){
		$zxt.mode("NORMAL");
		$zxt.render();
	}

	
	function onErrors(err){
		$zxtUI.__messager.setMessage(err);	
	};
</script>
